<template>
	<view>
		
		<view class="cu-card article" >
			<view class="cu-item shadow" v-for="(item, index) in datas" :key="index"
		 @click="onClick" :data-index="index">
				<view class="title flex justify-between">
					<view class="align-center">
						<text class="cuIcon-shop size-44"></text>
						<text class="margin-left-sm">{{item.name}}</text>
					</view>
					<view v-if="item.status==0">等待买家付款</view>
					<view v-if="item.status==1">等待退款</view>
					<view v-else>已完成</view>
				</view>
				<cu-list-goods :datas="item.goods"></cu-list-goods>
				<view class="flex flex-wrap padding-sm">
					<view class="cu-btn round flex-sub text-size-32 ">退款成功 退款￥58.90元</view>
				</view>
				<view class="flex justify-end">
					<button class="cu-btn round lines-gray margin-right-sm">删除记录</button>
					<button class="cu-btn round lines-red margin-right-sm">查看详情</button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import cuListGoods from '@/components/diy/list/cu-list-goods.vue'
	export default{
		data() {
			return{
				
			}
		},
		components:{
			cuListGoods
		},
		props: {
			datas: Array
		},
		created() {
			
		},
		watch: {
			
		},
		methods: {
			onClick(e) {
				let index = e.currentTarget.dataset.index;
				this.$emit("onchange", index);
			}
			
		}
	}
</script>

<style>
	.teacher-box{
		background-color: #FFFFFF;
		box-shadow: 0upx 0upx 10upx rgba(21, 22, 23, 0.24);
	}
	
	.title-text{
		font-size: 30upx;
		font-weight: bold;
	}
</style>